<div class="page-header">
    <div class="icon">
        <span class="ico-layout-7"></span>
    </div>
    <h1>Dealers <small>Listado de Dealers</small></h1>
</div>
<div class="row-fluid">
    <div class="span12">
        <div class="block">
            <div class="head dblue">
                <div class="icon"><span class="ico-layout-9"></span></div>
                <h2>Tabla de Distribuidores</h2>
                <ul class="buttons">
                    <li><a href="#" onClick="source('table_sort_pagination');
                                            return false;"><div class="icon"><span class="ico-info"></span></div></a></li>
                </ul>                                                        
            </div>                
            <div class="data-fluid">
                <table class="table fpTable lcnp" cellpadding="0" cellspacing="0" width="100%">
                    <thead>
                        <tr>
                            <th>Usuario</th>
                            <th>Nombre</th>
                            <th>Codigo</th>
                            <th>Monto</th>
                            <th>Acciones</th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php foreach ($usuarios as $us): ?>
                            <tr>
                                <td><?php echo $us['User']['username']; ?></td>
                                <td><?php echo $us['User']['nombre']; ?></td>
                                <td><?php echo $us['User']['codigo']; ?></td>
                                <td><?php echo $us['User']['monto_tmp']; ?></td>
                                <td>
                                    <a href="#bModal" role="button" class="btn" data-toggle="modal" onclick="$('#contenidomodal').load('<?php echo $this->Html->url(array('action' => 'ajaxregistra/' . $us['User']['id'])) ?>');">Recargar</a>
                                    <a href="#bModal" role="button" class="btn" data-toggle="modal" onclick="$('#contenidomodal').load('<?php echo $this->Html->url(array('controller' => 'Users', 'action' => 'ajaxedit/' . $us['User']['id'])) ?>');">Editar</a>

                                    <a href="#bModal" role="button" class="btn" data-toggle="modal" onclick="$('#contenidomodal').load('<?php echo $this->Html->url(array('action' => 'ajaxventas/' . $us['User']['id'])) ?>');">Ventas</a>
                                </td>
                            </tr> 
                        <?php endforeach; ?> 
                    </tbody>
                </table>                    
            </div> 
        </div> 

    </div>
</div>


    
<?php //echo $this->Js->writeBuffer(); ?> 